#pragma once

#include "BaseObject.h"
#include "StateMachine.h"
//#include "SteeringBehaviors.h"

//#include "ConsoleUtils.h"
//#include "EntityNames.h"

class SteeringBehaviors;

class Enemy : public BaseObject
{
private:

	StateMachine<Enemy>*				m_pStateMachine;
	
	SteeringBehaviors*					m_pSteering;

	/*Declare private variables
			TODO              */
	/** how much the enemy is moving per second */
	point	m_Velocity;
	point   m_Heading;
	point   m_Side;
	float   m_Mass;
	float   m_MaxSpeed;
	float   m_MaxForce;
	float   m_MaxTurnRate;

	float   m_Speed;
	

public:
	Enemy();
	Enemy(Enemy* E);
	Enemy(point loc, int assetindex);
		

	~Enemy();

	//this must be implemented
	
	void update(int);

	//this method changes the current state to the new state. It first calls 
	//the Exit() method of the current state, then assigns the new state to 
	//M_pCurrentState and finally calls the Enter() method of the new state.
	void ChangeState(State<Enemy>* NewState);

	StateMachine<Enemy>* GetFSM()const{return m_pStateMachine;}

	//virtual bool  HandleMessage(const Telegram& msg);

		//Set Functions
	void setVelocity(point a_velocity)	{m_Velocity = a_velocity;}
	void setSpeed(float a_speed)		{m_Speed = a_speed;}
	
		//Accessor Functions
	float Speed()		{return m_Speed;}	
	float MaxSpeed()	{return m_MaxSpeed;}
	point Velocity()	{return m_Velocity;}

	void collideWith(BaseObject*);

	//double GetHealth(){return Health;}
};